Usage
npm i @icreate/ics-chromely-plugin-core@0.0.18-beta3
feature
0.0.20-beta.8 适配chrome浏览器
0.0.20-beta1 增加html转pdf和打印html
0.0.20 增加获取打印机列表扩展方法
0.0.19-beta.1 增加pdf打印设置
0.0.19 增加pdf打印
0.0.18-beta7 新增获取本机Ip和Mac地址列表方法`getIpMacAddress`
0.0.18-beta6 修复注册表调用方法对应路由
0.0.18-beta5 注册表帮助类调用修改为Get方式
0.0.18-beta4 修复获取和设置注册表路由地址
0.0.18-beta3 增加发送按键事件、切换输入语言、切换为中文输入法、切换为英文输入法、切换当前语言的具体输入法、获取当前语言输入法列表和KeyCode定义
0.0.18-beta2 增加显示屏幕键盘
0.0.18 修改导出对象为默认导出
0.0.17 修改Chromely为单例模式
0.0.16 WindowHelper增加关闭和重绘闪屏README描述
0.0.15 WindowHelper增加关闭和重绘闪屏
0.0.14 ConfigHelper增加获取调试信息
0.0.13 HardwareHelper增加设置本地日期
0.0.12 修改注册表调用方法提供注册键设置
0.0.11 HardwareHelper增加获取操作系统版本、关闭操作系统和重启操作系统
0.0.10 HardwareHelper增加获取操作系统描述GetOSDesc()
Features
- LocalLogger:本地日志
- BrowserHelper:浏览器帮助类
- WindowHelper:主window帮助类
- chromely:chromely对象
- HardwareHelper:获取电脑Mac地址、Ip地址、主机名
- PrinterHelper:打印机类
- RegeditHelper:注册表类
- ConfigHelper:本地配置类
Importing library
You can import the generated bundle to use the whole library generated by this starter:
import { LocalLogger, BrowserHelper, WindowHelper, Chromely, ConfigHelper, KeyCode } from '@icreate/ics-chromely-plugin-core'
LocalLogger
level: LogLevels
debug(logObject: any): Promise<String>
info(logObject: any): Promise<String>
warn(logObject: any): Promise<String>
error(logObject: any): Promise<String>
fatal(logObject: any): Promise<String>
BrowserHelper
OpenChrome(url:string):void
OpenIE(url:string):void
OpenFireFox(url:string):void
OpenDefault(url:string):void
public static HtmlToPdf(settings: PdfSettings): Promise<any>
public static PrintHtml(settings: PrintSettings): Promise<any>
WindowHelper
Minimize(): void
Maximize(): void
Restore(): void
Close(): void
Restart(): void
State(): Promise<String>
CloseSplash(): void
RedrawSplash(message: string): void
ShowScreenKeyboard(): void
SendKeyEvent(keycode: number): void
SwitchLanguage(cultureType: string): void
SwitchLanguageToChinese(): void
SwitchLanguageToEnglish(): void
ChangeInputMethod(name: string): Promise<any>
GetInputMethodList(): Promise<any>
Chromely
isChromely: boolean
$on(eventName: string, callback: Function): void
$off(eventName: string, callback: Function): void
$emit(eventName: string): void
HardwareHelper
getMacAddress(): Promise<array>
getIpAddress(): Promise<array>
getIpMacAddress(): Promise<array>
getHostName(): Promise<string>
GetOSDesc(): Promise<string>
GetOsVersion(): Promise<string>
RestartOS(): void
CloseOS(): void
SetLocalTime(): Promise<string>
PrinterHelper
getPrinterList(): Promise<array>
getPrinterListEx(): Promise<array>
getPrinterDefault(): Promise<string>
isPrinterExists(printerName: string): Promise<bool>
printPdf(
bytes: ArrayBuffer,
settings: PrinterSettings | null = null
): Promise<any>
RegeditHelper
getRegeditValue(key: string, name: string): Promise<string>
setRegeditValue(key: string, name: string, value: string): Promise<string>
ConfigHelper
Get(key: string): Promise<string>
GetBaseUrl(): Promise<string>
/
GetDebug(): Promise<string>